package com.twu.biblioteca;

/**
 * Created by pchavez on 05/02/14.
 */
public class Movie implements Borrowable {

    private String name;
    private String rate;
    private String director;
    private String year;
    private Boolean available;
    private String TYPE = "movie";

    public Movie(String name, String rate, String director, String year) {
        this.name = name;
        this.rate = rate;
        this.director = director;
        this.year = year;
        this.available = true;
    }

    public String getInformation() {
        return name + ", " + rate + ", " + director + ", " + year;
    }

    @Override
    public void checkIn() {
        available = true;
    }

    @Override
    public void checkOut() {
        available = false;
    }

    @Override
    public String getTitle() {
        return name;
    }

    @Override
    public String getType() {
        return TYPE;
    }

    @Override
    public Boolean canBeCheckedIn(){
        return available == false;
    }

    @Override
    public Boolean canBeCheckedOut() {
        return available;
    }


}
